/*
 * 应用管理接口
 */
import axios from '@/utils/request'

const baseUrl = '/sys/application'
// 分页查询
export function findApplicationByConditions(params) {
  return axios.request({
    url: `${baseUrl}/findByConditions`,
    method: 'get',
    params: params
  })
}
// 按id查询
export function findApplicationById(params) {
  return axios.request({
    url: `${baseUrl}/findById`,
    method: 'GET',
    params: params
  })
}
// 创建
export function createApplication(params) {
  return axios.request({
    url: `${baseUrl}/`,
    method: 'POST',
    data: params
  })
}
// 更新
export function updateApplication(params) {
  return axios.request({
    url: `${baseUrl}/`,
    method: 'PUT',
    data: params
  })
}
// 查看密钥
export function showSecret(params) {
  return axios.request({
    url: `${baseUrl}/showSecret`,
    method: 'POST',
    data: params
  })
}
// 按状态查询应用
export function findAppByEnableStatus(params) {
  return axios.request({
    url: `${baseUrl}/findByEnableStatus`,
    method: 'get',
    params: params
  })
}


